//继续按钮
function continuestep5()
{
	window.location.href="step6.html";
}
//地图js
//var map = new AMap.Map('container', {
//resizeEnable: true, //是否监控地图容器尺寸变化
//zoom:11, //初始化地图层级
//center: [123.431867,41.703683] //初始化地图中心点
//});
//拖拽
//var marker = new AMap.Marker({
//position: map.getCenter(),
//icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
//offset: new AMap.Pixel(-13, -30),
//// 设置是否可以拖拽
//draggable: true,
//cursor: 'move',
//// 设置拖拽效果
//raiseOnDrag: true
//});
//marker.setMap(map);
//地图
var map = new AMap.Map('gmap', {
    zoom: 12,
    center: [123.431867,41.703683],
});
AMap.plugin(['AMap.ToolBar', 'AMap.Scale'], function() {
    var toolBar = new AMap.ToolBar();
    var scale = new AMap.Scale();
    map.addControl(toolBar);
    map.addControl(scale);
});

var marker = new AMap.Marker({
    position: map.getCenter(),
    draggable: true,
    cursor: 'move',
    raiseOnDrag: false,
    zIndex: 101
});
marker.setMap(map);

$('input[name=lng]').val(marker.getPosition().lng);
$('input[name=lat]').val(marker.getPosition().lat);

AMap.event.addListener(marker, "dragstart", function(e) {
    $('input[name=lng]').val(marker.getPosition().lng);
    $('input[name=lat]').val(marker.getPosition().lat);
});

AMap.event.addListener(marker, "dragging", function(e) {
    $('input[name=address]').val('检索地址中......');
    $('input[name=lng]').val(marker.getPosition().lng);
    $('input[name=lat]').val(marker.getPosition().lat);
});

AMap.event.addListener(marker, "dragend", function(e) {
    $('input[name=lng]').val(marker.getPosition().lng);
    $('input[name=lat]').val(marker.getPosition().lat);
    lnglatXY = [marker.getPosition().lng, marker.getPosition().lat];
    var geocoder = new AMap.Geocoder({
        radius: 1000,
        extensions: "all"
    });
    geocoder.getAddress(lnglatXY, function(status, result) {
        if (status === 'complete' && result.info === 'OK') {
            var address = result.regeocode.formattedAddress; //返回地址描述
            $('input[name=address]').val(address);
        }
    });
});